import sys

def main():
    '''
    input: corpus.txt
    (line) -> (c, 1).. for any character c in line
           -> (cc, 1).. for any 2 consecutive characters cc in line
    '''
    d = {}
    for line in sys.stdin:
        line = line.strip()

        for c in line:
            d[c] = d.get(c, 0) + 1

        for i in range(len(line) - 1):
            c = line[i: i + 2]
            d[c] = d.get(c, 0) + 1

    for c in d:
        print '%s\t%d' % (c, d[c])

if __name__ == '__main__':
    main()
